package com.gues.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gues.eneity.Imgs;
import com.gues.mapper.ImgsMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;

@Service
public class ImgsService {

    @Resource
    ImgsMapper imgsMapper;

    public List<Imgs> singleImgs() {
        QueryWrapper<Imgs> queryWrapper = new QueryWrapper<>();
        queryWrapper.select("url");
        queryWrapper.in("id", Arrays.asList(1,3,5,7,9,11,13,15,17,19,21,23,25,27,29));
        return imgsMapper.selectList(queryWrapper);
    }

    public List<Imgs> doubleImgs() {
        QueryWrapper<Imgs> queryWrapper = new QueryWrapper<>();
        queryWrapper.select("url");
        queryWrapper.in("id", Arrays.asList(2,4,6,8,10,12,14,16,18,20,22,24,26,28,30));
        return imgsMapper.selectList(queryWrapper);
    }
}
